﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Data;

public partial class CommunitySupport : System.Web.UI.Page
{
    public double UserID = 0;
    public string Name = "";
    public string EmailID = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["FullName"].ToString() != "" || Session["UserID"].ToString() != "" || Session["EmailID"].ToString() != "")
        {
            Name = Session["FullName"].ToString();
            UserID = Convert.ToDouble(Session["UserID"].ToString());
            EmailID = Session["EmailID"].ToString();

        }
        else
        {
            Response.Redirect("frmLogin.aspx");
        }

    }

    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        DataTable dtbl = SocialKlee.BusinessLogicLayer.BOLyer.GetDataTable("select * from Events where EventStartDate>= GETDATE() order by EventStartDate desc");

        if (dtbl.Rows.Count > 0)
        {
            Radgrid1.DataSource = dtbl;
        }

   }

    protected void CreateEvent_Click(object sender, EventArgs e)
    { 
    Response.Redirect("Events.aspx");
    }
}